'*********************************************
'Test I/O of ET-BASE PIC40 Board
'Hardware   : ET-BASE PIC40 (18F4620)
'file name  : PicBasic Pro compiler 
'Programmer : Watcharin Kaorop
'Company    : ETT  CO.,LTD.
' Date      : 9/11/2005
'*********************************************
 
B0      VAR     BYTE
B1      VAR     BYTE

DEFINE  OSC     10


          TRISA = $00      ' All PORTA is output
          TRISB = $00      ' All PORTB is output
          TRISC = $00      ' All PORTC is output
          TRISD = $00      ' All PORTD is output
          TRISE = $00      ' All PORTE is output
          
          ADCON1 = %00001111  ' portA is Digital I/O
          CMCON  = 7          ' comparators off

start_IO:   B0 = %00000001
          for  B1 = 0 to 6
            PORTA = B0
            B0 = B0 << 1
            pause 250
          next B1
       
        B0 = %00000001
       for  B1 = 0 to 8
           PORTB = B0
            B0 = B0 << 1
            pause 250
       next B1
       
            B0 = %00000001
       for  B1 = 0 to 8
           PORTC = B0
            B0 = B0 << 1
            pause 250
       next B1
       
            B0 = %00000001
       for  B1 = 0 to 8
           PORTD = B0
            B0 = B0 << 1
            pause 250
       next B1
       
       
          B0 = %00000001
       for  B1 = 0 to 3
           PORTE = B0
            B0 = B0 << 1
            pause 250
       next B1
                     
       goto start_IO
        
        
        
        
        






           
           

        
